<template>
	<view>
		<uni-nav-bar :fixed="true" left-icon="back" color="#156DAC" @clickLeft="pageback">
			<view class="header-icon-text-panel">
				<text class="title">运维单详情</text>
			</view>
		</uni-nav-bar>
		<view class="content padding">
			<view class="user-form" style="flex-direction: column;">
				<view class="card">
					<view class="user-form-item">
						<view class="user-form-item">
							<text class="form-label mini">设备：</text>
							<!-- <input v-if="!isDetail" class="form-input" v-model="obj.equipmentTypeName" name="key1" placeholder="请输入维护管理单位" /> -->
							<text class="form-input no-border">{{obj.equipmentTypeName}}</text>
						</view>
						<view class="user-form-item">
							<text class="form-label mini">排口：</text>
							<!-- <input v-if="!isDetail" class="form-input" v-model="obj.outletName" name="outletName" placeholder="请输入排放口名称" /> -->
							<text class="form-input no-border">{{obj.outletName}}</text>
						</view>

					</view>
					<view class="user-form-item">
						<view class="user-form-item">
							<text class="form-label mini">类型：</text>
							<!-- <input v-if="!isDetail" class="form-input" v-model="obj.outletTypeName" name="outletTypeName" placeholder="请输入排放口名称" /> -->
							<text class="form-input no-border">{{obj.outletTypeName}}</text>
						</view>
						<view class="user-form-item">
							<text class="form-label mini">企业：</text>
							<!-- <input v-if="!isDetail" class="form-input" v-model="obj.enterpriseName" name="key2" placeholder="请输入企业名称" /> -->
							<text class="form-input no-border">{{obj.enterpriseShort}}</text>
						</view>
					</view>
				</view>
				<!-- 评价 apply -->
				<view v-if="type == 'apply' || (type =='detail'&& hasEvaluated=='e020_03')" class="card">
					<view class="user-form-item">
						<text class="form-label ">运维结果评价</text>
						<uni-rate class="form-input no-border flex-start-center" :disabled="isDetail" :size="18"
							:value="rate.overallEvaluation" @change="(e)=>rateChange('overallEvaluation',e)" />
					</view>
					<view class="user-form-item">
						<text class="form-label ">处置人员评价</text>
						<uni-rate class="form-input no-border flex-start-center" :disabled="isDetail" :size="18"
							:value="rate.disposalPersonnelEvaluation"
							@change="(e)=>rateChange('disposalPersonnelEvaluation',e)" />
					</view>
					<view class="user-form-item">
						<text class="form-label ">内容说明</text>
						<input v-if="!isDetail" class="form-input" v-model="rate.contentDescription"
							name="contentDescription" placeholder="请填写评价内容" />
						<text v-else class="form-input no-border">{{rate.contentDescription}}</text>
					</view>
					<view class="user-form-item">
						<text class="form-label ">签字</text>
						<img v-if="signPath" class="form-input no-border" :src="signPath" />
						<text v-else class="form-input no-border" @click="operation">请先设置签名信息</text>
					</view>
					<view v-if="type == 'apply'" style="display: flex;flex-direction: row;justify-content: center;">
						<view @click="handleEvaluation"
							style="background-color: #156dac;color: #fff;text-align: center;border-radius: 10upx;padding: 5upx;flex: 0 0 50%;">
							<text>评价</text>
						</view>
					</view>
				</view>
				<!-- 审核 -->
				<view v-if="type == 'verifying'" style="margin-bottom: 20upx;">
					<view class="card">
						<view style="margin-bottom: 20upx;">
							<uni-easyinput type="textarea" v-model="verifyText" placeholder="请输入原因"></uni-easyinput>
						</view>
						<view style="display: flex;flex-direction: row;justify-content: space-between;">
							<text>审核意见：</text>
							<view @click="handleCheck('e016_04')"
								style="background-color: #156dac;color: #fff;text-align: center;border-radius: 10upx;padding: 5upx;flex: 0 0 30%;">
								<text>审核不通过</text>
							</view>
							<view @click="handleCheck('e016_03')"
								style="background-color: #156dac;color: #fff;text-align: center;border-radius: 10upx;padding: 5upx;flex: 0 0 30%;">
								<text>审核通过</text>
							</view>
						</view>
					</view>
				</view>
				<view v-if="type == 'update'">
					<view>
						<uni-data-checkbox multiple v-model="value" :localdata="range" @change="changeNew">
						</uni-data-checkbox>
					</view>
					<view style="display: flex;flex-direction: row;margin-bottom: 20upx;">
						<!-- <lb-picker :list="typeList" :props="typePickerProps" @confirm="pickerSelectConfim" style="flex: 1;"> -->
						<view @click="addType"
							style="background-color: #156dac;color: #fff;text-align: center;border-radius: 10upx;padding: 10upx;flex: 1;">
							<text>添加类型</text>
						</view>
						<!-- </lb-picker> -->
						<template v-if="obj.list && obj.list.length > 0">
							<view @click="handleSave(1)"
								style="background-color: #156dac;color: #fff;text-align: center;border-radius: 10upx;padding: 10upx;flex: 1;margin: 0 20upx;">
								<text>保存</text>
							</view>
							<view @click="handleSave(2)"
								style="background-color: #156dac;color: #fff;text-align: center;border-radius: 10upx;padding: 10upx;flex: 1;">
								<text>提交</text>
							</view>
						</template>
					</view>
				</view>
				<view class="card" v-if="obj.list && obj.list.length > 0">
					<uni-collapse accordion="true">
						<uni-collapse-item v-for="(item,index) in obj.list" :key="index" :title="item.formTempIdName"
							style="background-color: #fff;">
							<view v-if="type == 'update'" style="justify-content: flex-end;display: flex;">
								<!-- <uni-icons type="minus-filled" size="16" color="red" @click="handleDelList(index)">
								</uni-icons> -->
								<text style="color: red;" @click="handleDelList(index)">删除</text>
							</view>
							<view v-if="item.modelUrl === 'FS_XJWH_JLB'">
								<FS_XJWH_JLB :ref="'form_'+index" :obj="item" :isDetail="isDetail" />
							</view>
							<view v-else-if="item.modelUrl === 'FS_CSSZ_JLB'">
								<FS_CSSZ_JLB :ref="'form_'+index" :obj="item" :isDetail="isDetail" />
							</view>
							<view v-else-if="item.modelUrl === 'FS_JZJG_JLB'">
								<FS_JZJG_JLB :ref="'form_'+index" :obj="item" :isDetail="isDetail" />
							</view>
							<view v-else-if="item.modelUrl === 'FS_JX_JLB'">
								<FS_JX_JLB :ref="'form_'+index" :obj="item" :isDetail="isDetail" />
							</view>
							<view v-else-if="item.modelUrl === 'FS_YHPGH_JLB'">
								<FS_YHPGH_JLB :ref="'form_'+index" :obj="item" :isDetail="isDetail" />
							</view>
							<view v-else-if="item.modelUrl === 'FS_BZYPGH_JLB'">
								<FS_BZYPGH_JLB :ref="'form_'+index" :obj="item" :isDetail="isDetail" />
							</view>
							<view v-else-if="item.modelUrl === 'FS_SYJG_JLB'">
								<FS_SYJG_JLB :ref="'form_'+index" :obj="item" :isDetail="isDetail" />
							</view>
							<view v-else-if="item.modelUrl === 'FS_BS_BC_JLB'">
								<FS_BS_BC_JLB :ref="'form_'+index" :obj="item" :isDetail="isDetail" />
							</view>
							<view v-else-if="item.modelUrl === 'FS_FYSJ_JLB'">
								<FS_FYSJ_JLB :ref="'form_'+index" :obj="item" :isDetail="isDetail" />
							</view>
							<view v-else-if="item.modelUrl === 'FS_ZDJCYJY_JL'">
								<FS_ZDJCYJY_JL :ref="'form_'+index" :obj="item" :isDetail="isDetail" />
							</view>
							<view v-else-if="item.modelUrl === 'YQ_RCXJ_JLB'">
								<YQ_RCXJ_JLB :ref="'form_'+index" :obj="item" :isDetail="isDetail" />
							</view>
							<view v-else-if="item.modelUrl === 'YQ_PYYJZ_JLB'">
								<YQ_PYYJZ_JLB :ref="'form_'+index" :obj="item" :isDetail="isDetail" />
							</view>
							<view v-else-if="item.modelUrl === 'YQ_JYCS_JL'">
								<YQ_JYCS_JL :ref="'form_'+index" :obj="item" :isDetail="isDetail" />
							</view>
							<view v-else-if="item.modelUrl === 'YQ_WX_JLB'">
								<YQ_WX_JLB :ref="'form_'+index" :obj="item" :isDetail="isDetail" />
							</view>
							<view v-else-if="item.modelUrl === 'YQ_YHPGH_JLB'">
								<YQ_YHPGH_JLB :ref="'form_'+index" :obj="item" :isDetail="isDetail" />
							</view>
							<view v-else-if="item.modelUrl === 'YQ_QTGH_JL'">
								<YQ_QTGH_JL :ref="'form_'+index" :obj="item" :isDetail="isDetail" />
							</view>
							<view v-else-if="item.modelUrl === 'YQ_BS_BC_JL'">
								<YQ_BS_BC_JL :ref="'form_'+index" :obj="item" :isDetail="isDetail" />
							</view>
						</uni-collapse-item>
					</uni-collapse>
				</view>

			</view>
		</view>
	</view>
</template>

<script>
	import LbPicker from '@/components/lb-picker'

	import FS_XJWH_JLB from "./components/FS_XJWH_JLB.vue"
	import FS_BS_BC_JLB from "./components/FS_BS_BC_JLB.vue"
	import FS_CSSZ_JLB from "./components/FS_CSSZ_JLB.vue"
	import FS_BZYPGH_JLB from "./components/FS_BZYPGH_JLB.vue"
	import FS_JX_JLB from "./components/FS_JX_JLB.vue"
	import FS_JZJG_JLB from "./components/FS_JZJG_JLB.vue"
	import FS_SYJG_JLB from "./components/FS_SYJG_JLB.vue"
	import FS_YHPGH_JLB from "./components/FS_YHPGH_JLB.vue"
	import FS_FYSJ_JLB from "./components/FS_FYSJ_JLB.vue"
	import FS_ZDJCYJY_JL from "./components/FS_ZDJCYJY_JL.vue"
	import YQ_RCXJ_JLB from "./components/YQ_RCXJ_JLB.vue"
	import YQ_PYYJZ_JLB from "./components/YQ_PYYJZ_JLB.vue"
	import YQ_JYCS_JL from "./components/YQ_JYCS_JL.vue"
	import YQ_WX_JLB from "./components/YQ_WX_JLB.vue"
	import YQ_YHPGH_JLB from "./components/YQ_YHPGH_JLB.vue"
	import YQ_QTGH_JL from "./components/YQ_QTGH_JL.vue"
	import YQ_BS_BC_JL from "./components/YQ_BS_BC_JL.vue"
	import {
		parseTime
	} from '@/common/util.js'
	const listQuery = '/business/maintenance/selectMaintenanceList'
	const getTree = '/base/outlet/listTree'
	const detailUrl = '/business/maintenance/selectTMaintenanceDetailsDto'
	const getTypeUrl = '/business/maintenance/selectFormTempByCd'

	const saveUrl = '/business/maintenance/saveTMaintenanceDetailsDto2'
	const saveCheckUrl = '/business/maintenance/saveCheck'
	const evaluationUrl = '/business/maintenance/editEvaluation'
	export default {
		components: {
			LbPicker,
			FS_XJWH_JLB,
			FS_CSSZ_JLB,
			FS_JZJG_JLB,
			FS_JX_JLB,
			FS_YHPGH_JLB,
			FS_BZYPGH_JLB,
			FS_SYJG_JLB,
			FS_BS_BC_JLB,
			FS_FYSJ_JLB,
			FS_ZDJCYJY_JL,
			YQ_RCXJ_JLB,
			YQ_PYYJZ_JLB,
			YQ_JYCS_JL,
			YQ_WX_JLB,
			YQ_YHPGH_JLB,
			YQ_QTGH_JL,
			YQ_BS_BC_JL
		},
		data() {
			return {
				isDetail: false,
				type: '',
				hasEvaluated: '',
				verifyText: '', // 审核意见
				obj: {},
				rate: {
					overallEvaluation: 5,
					disposalPersonnelEvaluation: 5,
					contentDescription: '',
					op: '1',
				},
				typeList: [],
				typePickerProps: {
					label: 'shortName',
					value: 'id',
				},
				id: '',
				signPath: '',
				value: [],
				range: [],
				selectedType: {}, //所以已经选中的单位
				currentSelected: {
					data: [],
					value: []
				}, //之前已选中的单位
				saveWitch: false
			}
		},
		onLoad(option) {
			// detailUrl
			this.getDetail(option.id)
			this.id = option.id
			this.isDetail = option.type === 'detail'
			this.type = option.type
			this.hasEvaluated = option.hasEvaluated
			let cp = '1'
			if (option.cp == '0') {
				cp = '0'
			}
			console.log('option', option)
			let val1 = option.overallEvaluation
			let val2 = option.disposalPersonnelEvaluation
			if (this.type == 'apply') {
				if (!val1) {
					val1 = 0
				}
				if (!val2) {
					val2 = 0
				}
			}
			this.rate = {
				overallEvaluation: parseInt(val1),
				disposalPersonnelEvaluation: parseInt(val2),
				contentDescription: option.contentDescription,
				cp: cp
			}
			// this.initTypeList()
			
		},
		methods: {
			pageback() {
				uni.navigateBack({
					delta: 1,
				});
			},
			rateChange(key, e) {
				this.rate[key] = e.value
			},
			// 设置签名
			operation() {
				let url = `/pages/resources1/resources1`
				uni.navigateTo({
					url
				})
			},
			handleEvaluation() {
				if (this.rate.overallEvaluation === 0) {
					this.$api.toastMsg('请对运维结果评价')
					return
				}
				if (this.rate.disposalPersonnelEvaluation === 0) {
					this.$api.toastMsg('请对处置人员评价')
					return
				}
				uni.showLoading({
					title: '提交中',
					mask: true
				})
				this.$api.request(evaluationUrl, {
					method: 'post',
					data: [{
						maintenanceId: this.id,
						signatureImagePath: this.signPath,
						...this.rate,
					}]
				}).then(res => {
					console.log(res)
					uni.hideLoading()
					if (res.success) {
						// this.obj = res.data.list
						this.$api.toastMsg('评价成功', 'success')
						setTimeout(() => {
							this.pageback()
						}, 1000);
					} else {
						this.$api.toastMsg(res.message)
					}
				}).catch(() => {
					uni.hideLoading()
				})
			},
			handleCheck(status) {
				//maintenanceStatus
				uni.showLoading({
					title: '提交中',
					mask: true
				})
				this.$api.request(saveCheckUrl, {
					method: 'post',
					data: [{
						maintenanceId: this.id,
						operationContent: this.verifyText,
						maintenanceStatus: status
					}]
				}).then(res => {
					console.log(res)
					uni.hideLoading()
					if (res.success) {
						// this.obj = res.data.list
						this.$api.toastMsg('审核成功', 'success')
						setTimeout(() => {
							this.pageback()
						}, 1000);
					} else {
						this.$api.toastMsg(res.message)
					}
				}).catch(() => {
					uni.hideLoading()
				})
			},
			handleSave(op) {
				var formTypes = []
				const list = this.obj.list.map((item, index) => {
					formTypes.push(item.formTempIdName)
					console.log(this.$refs)
					const ref = 'form_' + index
					console.log(this.$refs[ref])
					const data = this.$refs[ref][0].getFormData()
					return {
						...item,
						...data
					}
				})
				uni.showLoading({
					title: '提交中',
					mask: true
				})
				this.$api.request(saveUrl, {
					method: 'post',
					data: {
						...this.obj,
						list,
						opType: op,
						formType: formTypes
					}
				}).then(res => {
					console.log(res)
					uni.hideLoading()
					if (res.success) {
						// this.obj = res.data.list
						this.$api.toastMsg(op == 1 ? '保存' : '提交' + '成功', 'success')
						setTimeout(() => {
							// this.pageback()
							uni.navigateTo({
								url:`/pages/devops/devops`
							})
						}, 1000);
					} else {
						this.$api.toastMsg(res.message)
					}
				}).catch(() => {
					uni.hideLoading()
				})
			},
			pickerSelectConfim(e, index) {
				console.log(e, index)
				const item = e;
				// this.selectedType.forEach((item,index)=>{

				// })
				// for (let i = 0; i < this.selectedType.length; i++) {

				// }
				this.$api.request('/business/maintenance/selectLastMaintenance2', {
					method: 'get',
					data: {
						'outletId': this.obj.outletId,
						'equipmentId': this.obj.equipmentId,
						'formTempId': item.id
					}
				}).then(res => {
					console.log(this.selectedType)
					this.currentSelected = this.selectedType;
					this.obj.list.push({
						lastMaintenance: res.data.list,
						modelUrl: item.modelUrl,
						enterpriseName: this.obj.enterpriseName,
						formTempIdName: item.shortName,
						formTempId: item.id,
						equipmentTypeName: this.obj.equipmentTypeName,
						equipmentNumber: this.obj.equipmentNumber,
						outletName: this.obj.outletName,
						outletTypeName: this.obj.outletTypeName,
						code: index
					})
				}).catch(() => {
					this.obj.list.push({
						// ...item,
						modelUrl: item.modelUrl,
						formTempIdName: item.shortName,
						formTempId: item.id,
						enterpriseName: this.obj.enterpriseName,
						equipmentTypeName: this.obj.equipmentTypeName,
						equipmentNumber: this.obj.equipmentNumber,
						outletName: this.obj.outletName,
						outletTypeName: this.obj.outletTypeName,
					})
				})
			},
			addType() {
				// console.log(this.obj)
				// this.range;
				let ary01;
				let ary02;
				let objString1;
				let objString2;
				let ary03;
				console.log(this.currentSelected.value)
				console.log(this.selectedType.value)
				if (!this.currentSelected.value) {
					this.currentSelected.value = 0;
				}
				if (this.currentSelected.value.length > 0) {
					objString1 = JSON.stringify(this.selectedType.value);
					ary01 = JSON.parse(objString1);
					objString2 = JSON.stringify(this.currentSelected.value);
					ary02 = JSON.parse(objString2);
					// let ary01 = this.selectedType.value
					// let ary02 = this.currentSelected
					ary03 = []
					// if (ary02.length > ary01.length) {
					// 	objString1 = JSON.stringify(this.currentSelected.value);
					// 	ary01 = JSON.parse(objString1);
					// 	objString2 = JSON.stringify(this.selectedType.value);
					// 	ary02 = JSON.parse(objString2);
					// 	// ary01 = this.currentSelected
					// 	// ary02 = this.selectedType.value
					// 	for (var i = 0; i < ary01.length; i++) {
					// 		for (var j = 0; j < ary02.length; j++) {
					// 			if (ary01[i] == ary02[j]) {
					// 				ary01[i] = "";
					// 				break;
					// 			}
					// 		}
					// 	}
					// 	console.log(ary01) //["",2,3,4,""]
					// 	for (var i = 0; i < ary01.length; i++) {
					// 		if (ary01[i] !== "") {
					// 			ary03.push(ary01[i])
					// 		}
					// 	}
					// 	console.log(ary03)
					// 	console.log(this.obj.list)
					// 	ary03.forEach((item,index) => {
					// 		console.log(index)
					// 		console.log(this.currentSelected)
					// 		this.obj.list.indexOf(this.range[item].text)
					// 		// console.log(this.obj.list)
					// 		console.log(this.range)
					// 		console.log(this.range[item].text)
					// 	})
					// 	// this.obj.list.splice(index, 1)
					// 	return;
					// }
					for (var i = 0; i < ary01.length; i++) {
						for (var j = 0; j < ary02.length; j++) {
							if (ary01[i] == ary02[j]) {
								ary01[i] = "";
								break;
							}
						}
					}
					// if(this.saveWitch = true){
					// 	// this.currentSelected.value
					// 	console.log(this.currentSelected.value)
					// }
					console.log(ary01) //["",2,3,4,""]
					for (var i = 0; i < ary01.length; i++) {
						if (ary01[i] !== "") {
							ary03.push(ary01[i])
						}
					}
					console.log(ary03) //[2,3,4]
					if (ary03.length > 0) {
						ary03.forEach(index => {
							this.pickerSelectConfim(this.typeList[index], index);
							console.log(this.typeList[index])
						})
					}
				} else {
					this.selectedType.value.forEach(index => {
						this.pickerSelectConfim(this.typeList[index], index);
						// console.log(this.typeList[index])
					})
				}
				// this.selectedType.value.forEach(index => {
				// 	this.pickerSelectConfim(this.typeList[index]);
				// 	console.log(this.typeList[index])
				// })
			},
			changeNew(e) {
				console.log(e)
				this.saveWitch = false;
				this.selectedType = e.detail;
				console.log(this.selectedType);
			},
			handleDelList(index) {
				console.log(index)
				console.log(this.currentSelected)

				// this.currentSelected = this.selectedType;
				// console.log(this.selectedType)
				// console.log(this.obj.list[index])
				// console.log(this.selectedType.data.indexOf(this.obj.list[index].formTempIdName))
				// for (let i = 0; i < Things.length; i++) {

				// }
				if (this.saveWitch) {
					// console.log(this.value)
					this.value.forEach((item, i) => {
						if (item == this.obj.list[index].code) {
							this.value.splice(i, 1); // 从下标 i 开始, 删除 1 个元素
							this.currentSelected.value.splice(this.currentSelected.value.indexOf(this.obj.list[index].code), 1)
						}
						// this.currentSelected.data.splice(this.currentSelected.data.indexOf(this.obj.list[index].formTempIdName), 1)
					})
					// console.log(this.obj.list[index].code)
					// this.value.splice(this.obj.list[index].code, 1)
				}else{
					this.selectedType.value.splice(this.selectedType.value.indexOf(this.obj.list[index].code), 1)
					// this.selectedType.data.splice(this.selectedType.data.indexOf(this.obj.list[index].formTempIdName), 1)
				}
				console.log(this.currentSelected.value)
				this.obj.list.splice(index, 1)
				// console.log(this.selectedType.value)
				// this.selectedType.value.forEach((item,i)=>{
				// 	// if(item.value==this.obj.list[index].code){

				// 	// }
				// 	// console.log(this.obj.list[index].code)
				// 	if(this.selectedType.value[i].indexOf(this.obj.list[index].code) === this.obj.list[index].code){
				// 		console.log(this.selectedType.value.indexOf(this.obj.list[index].code))
				// 	}
				// })
			},
			initTypeList(typeId, enterpriseId) {
				this.$api.request(getTypeUrl, {
					method: 'get',
					data: {
						equipmentTypeId: typeId,
						enterpriseId: enterpriseId
					}
				}).then(res => {
					if (res.success) {
						// this.obj = res.data.list
						this.typeList = res.data.list
						// for(let i in this.typeList){
						// 	// console.log(i)
						//     this.range.push({"value":this.typeList[i],"text": this.typeList[i].shortName})
						// }
						console.log(typeof(this.range))
						this.typeList.forEach((item, index) => {
							this.range.push({
								"value": index,
								"text": item.shortName
							})
						})
						let aa = this.obj.list;
						let bb = this.range;
						console.log(bb)
						for (let i = 0; i < aa.length; i++) {
							for (let j = 0; j < bb.length; j++) {
								if (aa[i].formTempIdName == bb[j].text) {
									console.log(bb[j].value)
									this.obj.list[i].code = bb[j].value
									this.value.push(bb[j].value);
									this.currentSelected.data.push({
										text: bb[j].text,
										value: bb[j].value
									});
									this.currentSelected.value.push(bb[j].value);
									console.log(this.currentSelected)
									// if(this.value.length==this.obj.list.length){
									// 	// this.changeNew();
									// 	// console.log(this.selectedType)
									// }
									break;
								}
							}
						}
						this.obj.list.forEach((item, index) => {
							console.log(this.range.indexOf(item.formTempIdName))
							// this.range.indexOf(item.formTempIdName)
						})
						// console.log(this.range)
						// // for (let i = 0; i < this.obj.list.length; i++) {
						// 	for (let j = 0; j < this.range.length; j++) {
						// 	console.log(this.range[j].text)
						// 		// if(this.range[j].text == this.obj.list[i].formTempIdName){
						// 		// 	console(i)
						// 		// }
						// 		// this.range[i].text.indexOf(this.obj.list[index].formTempIdName)
						// 	}
						// // }

						console.log('typeList:', this.typeList)
					}
				}).catch(() => {})
			},
			getDetail(id) {
				this.$api.request(detailUrl, {
					method: 'get',
					data: {
						maintenanceId: id
					}
				}).then(res => {
					console.log('detail', res)
					if (res.success) {
						// 过滤无排口数据
						const list = res.data.list
						this.obj = list
						
						if(list.signatureImagePath){
							this.signPath = list.signatureImagePath
						}else{
							const user = uni.getStorageSync('USER_INFO');
							this.signPath = user.signPath ? 'https://www.cdlepan.com:7443' + user.signPath : ''
						}
						// console.log(this.obj.list.length)
						if (this.obj.list.length > 0) {
							this.saveWitch = true;
						}
						this.initTypeList(list.equipmentTypeId, list.enterpriseId)
						console.log(this.obj.list)
						console.log(this.range)
						// for (var j = 0; j < this.range.length; j++) {
						// for (let i = 0; i < this.obj.list.length; i++) {
						// for (let aa = 0; aa < this.range.length; aa++) {
						// 	// Things[i]
						// 	console.log(this.range[aa])
						// }
						// if(this.range[j].text == this.obj.list[i].formTempIdName){
						// 	console(i)
						// }
						// this.range[i].text.indexOf(this.obj.list[index].formTempIdName)
						// }
						// }
						// this.obj.list.forEach((item,index)=>{
						// 	console.log(this.range[0].indexOf(item.formTempIdName))
						// 	// this.range.indexOf(item.formTempIdName)
						// })
						// for (let i = 0; i < Things.length; i++) {
						// 	Things[i]
						// }
					}
				}).catch(() => {})
			}

		}
	}
</script>

<style lang="scss" scoped>
	.page-content-list {
		position: relative;
		width: 100%;
		display: flex;
		flex-direction: column;

		.content-list-cell {
			position: relative;
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			align-items: center;
		}
	}
</style>
